import axios from "../../utils/request";

function getNews(query) {
    return axios.get('/news', { params: query })
}

function addNews(body) {
    // console.log(body,'11111 ');
    return axios.post('/addNews', body)
}

function editNews(body) {
    return axios.put('/editNews', body)
}

function delNews(id) {
    return axios.delete(`/delNews/${id}`)
}

export default {
    getNews,
    addNews,
    editNews,
    delNews
}